package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.sql.Date;
import java.util.Objects;

@Entity
@Table(name = "solution_", schema = "boot", catalog = "")
public class Solution {//解决方案
    private int solutionId;//方案id
    private Sales sales;//机会id
    private Kehu kehu;//客户id
    private Demand demand;//需求id
    private Competitor competitor;//竞争id
    private String solutionName;//方案名称
    private Date solutionDate;//方案时间
    private String solutionContent;//方案内容
    private String solutionFeedback;//客户反馈
    private Integer solutionSc;//删除状态

    @Id
    @Column(name = "solution_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getSolutionId() {
        return solutionId;
    }

    public void setSolutionId(int solutionId) {
        this.solutionId = solutionId;
    }

    @ManyToOne
    @JoinColumn(name = "sales_id", referencedColumnName = "sales_id")
    public Sales getSales() {
        return sales;
    }

    public void setSales(Sales sales) {
        this.sales = sales;
    }
    @ManyToOne
    @JoinColumn(name = "k_id", referencedColumnName = "k_id")
    public Kehu getKehu() {
        return kehu;
    }

    public void setKehu(Kehu kehu) {
        this.kehu = kehu;
    }

    @ManyToOne
    @JoinColumn(name = "demand_id", referencedColumnName = "demand_id")
    public Demand getDemand() {
        return demand;
    }

    public void setDemand(Demand demand) {
        this.demand = demand;
    }

    @ManyToOne
    @JoinColumn(name = "competitor_id", referencedColumnName = "competitor_id")
    public Competitor getCompetitor() {
        return competitor;
    }

    public void setCompetitor(Competitor competitor) {
        this.competitor = competitor;
    }

    @Basic
    @Column(name = "solution_name")
    public String getSolutionName() {
        return solutionName;
    }

    public void setSolutionName(String solutionName) {
        this.solutionName = solutionName;
    }

    @Basic
    @Column(name = "solution_date")
    public Date getSolutionDate() {
        return solutionDate;
    }

    public void setSolutionDate(Date solutionDate) {
        this.solutionDate = solutionDate;
    }

    @Basic
    @Column(name = "solution_content")
    public String getSolutionContent() {
        return solutionContent;
    }

    public void setSolutionContent(String solutionContent) {
        this.solutionContent = solutionContent;
    }

    @Basic
    @Column(name = "solution_feedback")
    public String getSolutionFeedback() {
        return solutionFeedback;
    }

    public void setSolutionFeedback(String solutionFeedback) {
        this.solutionFeedback = solutionFeedback;
    }

    @Basic
    @Column(name = "solution_sc")
    public Integer getSolutionSc() {
        return solutionSc;
    }

    public void setSolutionSc(Integer solutionSc) {
        this.solutionSc = solutionSc;
    }

    @Override
    public String toString() {
        return "Solution{" +
                "solutionId=" + solutionId +
                ", sales=" + sales +
                ", kehu=" + kehu +
                ", solutionName='" + solutionName + '\'' +
                ", solutionDate=" + solutionDate +
                ", solutionContent='" + solutionContent + '\'' +
                ", solutionFeedback='" + solutionFeedback + '\'' +
                ", solutionSc=" + solutionSc +
                '}';
    }
}
